﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Settings.aspx.cs" Inherits="INHollandair.Account.Settings" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="container pull-down">
        <div class="row">
            <div class="span8 offset2">
                 <h2>Account instellingen</h2>
                <fieldset class="well roundedBorder form-horizontal">
                    <table>
                        <tr>
                            <td>
                                <b>Gebruikersnaam:</b>
                            </td>
                            <td>
                                <asp:Label ID="username_lbl" runat="server" Text="[username]"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Email:</b>
                            </td>
                            <td>
                                <asp:Label ID="email_lbl" runat="server" Text="[email]"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>INHollandair miles:</b>
                            </td>
                            <td>
                                <asp:Label ID="points_lbl" runat="server" Text="[points]"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <b>Datum geregistreerd:</b>&nbsp;&nbsp;&nbsp;
                            </td>
                            <td>
                                <asp:Label ID="dateregister_lbl" runat="server" Text="[dateregistered]"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                            <td>
                                <asp:Button ID="edituser" runat="server" Text="Bewerk gegevens" Cssclass="btn btn-inverse"
                                    onclick="edituser_Click" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">

                                 <asp:Button ID="deleteaccount" runat="server" Text="Account deactiveren" Cssclass="btn btn-danger"
                                     onclick="deleteaccount_Click" />
                            </td>
                        </tr>
                    </table>
                </fieldset>
                <h2>Bestelde producten</h2>
                <fieldset class="well roundedBorder form-horizontal">
                    <asp:GridView ID="OrderedProducts"  CssClass="table table-striped table-condensed table-bordered" AutoGenerateColumns="False" runat="server" onrowcommand="ProductGrid_RowCommand">
                        <Columns>
                            <asp:TemplateField>
                                <HeaderTemplate>ID</HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Label
                                        ID="IDField" 
                                        Text=' <%#Eval("ID")%>'      
                                        width="20px" 
                                        runat="server" />
                                </ItemTemplate>
                                <HeaderStyle Width="20px" />
                                <ItemStyle Width="20px" />
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>Bestemming</HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Label
                                        ID="NameField" 
                                        Text=' <%#Eval("ProductName")%>'      
                                        width="100px" 
                                        runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>Price (€)</HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Label
                                        ID="PriceField" 
                                        Text='<%#Eval("ProductPrice")%>'      
                                        width="100px" 
                                        runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <HeaderTemplate>Date</HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Label
                                        ID="DateField" 
                                        Text='<%#((DateTime)Eval("DateOrdered")).ToString("dd-MM-yyyy")%>'      
                                        width="100px" 
                                        runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                              <ItemTemplate>
                                <asp:LinkButton runat="server" Cssclass="btn btn-danger" ID="btn_cancelOrder" Text="Annuleer bestelling" 
                                      CommandName="CancelOrder" CommandArgument='<%# Eval("OrderUrl")%>' />
                              </ItemTemplate> 
                                <HeaderStyle Width="140px" />
                                <ItemStyle Width="140px" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </fieldset>
            </div>
        </div>
    </div>
</asp:Content>
